package com.hddz.acquisition;

import android.content.Intent;


import org.xutils.common.Callback;
import org.xutils.ex.HttpException;

/**
 * Created by weiguo on 2017/10/16.
 */

public class SmartCallBack<ResultType> implements Callback.CommonCallback<ResultType> {
    public String cmd ;



    @Override
    public void onSuccess(ResultType result) {
        //可以根据公司的需求进行统一的请求成功的逻辑处理
        int i = 0;
    }

    @Override
    public void onError(Throwable ex, boolean isOnCallback) {
        //可以根据公司的需求进行统一的请求网络失败的逻辑处理
        if (ex instanceof HttpException) { // 网络错误
            HttpException httpEx = (HttpException) ex;
            int responseCode = httpEx.getCode();
            String responseMsg = httpEx.getMessage();
            String errorResult = httpEx.getResult();
            if (responseCode == 403) {
            }
        }
    }

    @Override
    public void onCancelled(CancelledException cex) {

    }

    @Override
    public void onFinished() {

    }
}
